<template>
    <div class="container">
        <el-card shadow="hover" style="padding:0">
            <el-button type="primary" size="medium" icon="el-icon-search" @click="scheduler01">添加定时任务</el-button>
            <el-button type="primary" size="medium" icon="el-icon-search" @click="scheduler02">暂停定时任务</el-button>
            <el-button type="primary" size="medium" icon="el-icon-search" @click="scheduler03">恢复定时任务</el-button>
            <el-button type="primary" size="medium" icon="el-icon-search" @click="scheduler04">删除定时任务</el-button>
            
            <el-button type="primary" size="medium" icon="el-icon-search" @click="serialNumberUtil">获取订单号</el-button>
            <el-button type="primary" size="medium" icon="el-icon-search" @click="sendSMSValidCode">测试发送短信验证码</el-button>
            <el-button type="primary" size="medium" icon="el-icon-search" @click="testPost">测试POST</el-button>
            <el-button type="primary" size="medium" icon="el-icon-search" @click="accessToken">accessToken</el-button>
            <el-button type="primary" size="medium" icon="el-icon-search" @click="sendMail">发送邮件</el-button>
            <el-button type="primary" size="medium" icon="el-icon-search" @click="shardingjdbcSave">分表-添加数据</el-button>
        </el-card>
    </div>
</template>

<script>
import http from "@/libs/http";
import { ResultMessage } from "@/libs/response";
export default {
    name: "Test",
    data() {
        return {};
    },
    methods: {
        scheduler01() {
            http({
                url: '/system/test/quartz/add',
                method: 'get'
            }).then(response => {
                ResultMessage(response)
            })
        },
        scheduler02() {
            http({
                url: '/system/test/quartz/pause',
                method: 'get'
            }).then(response => {
                ResultMessage(response)
            })
        },
        scheduler03() {
            http({
                url: '/system/test/quartz/resume',
                method: 'get'
            }).then(response => {
                ResultMessage(response)
            })
        },
        scheduler04() {
            http({
                url: '/system/test/quartz/delete',
                method: 'get'
            }).then(response => {
                ResultMessage(response)
            })
        },
        
        serialNumberUtil() {
            http({
                url: '/system/test/serialNumberUtil',
                method: 'get'
            }).then(response => {
                ResultMessage(response)
            })
        },
        sendSMSValidCode() {
            http({
                url: '/mall/user/sendSMSValidCode',
                method: 'get',
                params: {mobile: '15602208451'}
            }).then(response => {
                ResultMessage(response)
            })
        },
        testPost() {
            http({
                url: '/mall/user/checkSMSValidCode',
                method: 'get',
                params: {mobile: '15602208451', smsCode: '132465'},
            }).then(response => {
                ResultMessage(response)
            })
        },
        accessToken() {
            http({
                url: '/test/accessToken',
                method: 'get',
            }).then(response => {
                ResultMessage(response)
            })
        },
        sendMail() {
            http({
                url: '/system/test/sendMail',
                method: 'get',
            }).then(response => {
                ResultMessage(response)
            })
        },
        shardingjdbcSave() {
            http({
                url: '/test/save',
                method: 'get',
            }).then(response => {
                ResultMessage(response)
            })
        }
    }
};
</script>

<style scoped>
</style>